﻿<UserControl x:Class="XamlPhysics.Samples.Polygons"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:physics="clr-namespace:XamlPhysics;assembly=XamlPhysics"
    mc:Ignorable="d"
    d:DesignHeight="768" d:DesignWidth="1024">

    <Canvas>
        <Polygon Points="0,10, 10,0, 20,10, 9,90" Fill="DarkRed" Canvas.Left="600" Canvas.Top="110" Width="20" Height="90">
            <physics:PhysicalBox.Body>
                <physics:PolygonBody>
                </physics:PolygonBody>
            </physics:PhysicalBox.Body>
        </Polygon>
        <Polygon Points="0,10, 10,0, 20,10, 11,90" Fill="DarkGreen" Canvas.Left="407" Canvas.Top="316" Width="20" Height="90">
            <physics:PhysicalBox.Body>
                <physics:PolygonBody>
                </physics:PolygonBody>
            </physics:PhysicalBox.Body>
        </Polygon>
        <Polygon Points="0,10, 10,0, 40,10, 31,50" Fill="DarkGoldenrod" Canvas.Left="476" Canvas.Top="48" Width="50" Height="90">
            <physics:PhysicalBox.Body>
                <physics:PolygonBody>
                </physics:PolygonBody>
            </physics:PhysicalBox.Body>
        </Polygon>

        <Rectangle Canvas.Left="-100" Canvas.Top="768" Width="1240" Height="10" Fill="Black">
            <physics:PhysicalBox.Body>
                <physics:RectangleBody IsStatic="True" />
            </physics:PhysicalBox.Body>
        </Rectangle>
    </Canvas>
</UserControl>